home *** CD-ROM | disk | FTP | other *** search
/ One Click 21 (Special) / OC021.iso / Juegos / King of Skeleton / King of Skeleton.swf / scripts / __Packages / Background.as < prev    next >
Encoding:
Text File  |  2006-02-02  |  552 b   |  32 lines

  1. class Background extends MovieClip
  2. {
  3.    var sx;
  4.    var sy;
  5.    function Background()
  6.    {
  7.       super();
  8.       this.sx = this._x;
  9.       this.sy = this._y;
  10.    }
  11.    function jiggle(v)
  12.    {
  13.       var _loc2_ = v * 1000 / 50;
  14.       if(Math.random() > 0.5)
  15.       {
  16.          this._x = this.sx + _loc2_;
  17.       }
  18.       else
  19.       {
  20.          this._x = this.sx - _loc2_;
  21.       }
  22.       if(Math.random() > 0.5)
  23.       {
  24.          this._y = this.sy + _loc2_;
  25.       }
  26.       else
  27.       {
  28.          this._y = this.sy - _loc2_;
  29.       }
  30.    }
  31. }
  32.